package com.ztgf.commodity.service;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.ztgf.commodity.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ztgf.commodity.mapper.BrandInfoAuditMapper;
import com.ztgf.commodity.models.service.IBrandInfoAuditService;
import com.ztgf.commodity.models.bo.BrandInfoAuditSaveBO;
import com.ztgf.commodity.models.dto.BrandInfoAuditDTO;

/**
 * 品牌审核表控制器
 *
 * @author zhanghualang
 * @Date 2020-06-24 14:42:03
 */
@DubboService
public class BrandInfoAuditServiceImpl extends ServiceImpl<BrandInfoAuditMapper, BrandInfoAuditDTO> implements IBrandInfoAuditService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(BrandInfoAuditSaveBO saveBO) {
        BrandInfoAuditDTO dto = new BrandInfoAuditDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
